<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.grep.web.IndexService,java.util.*"%>
<%@ include file="/./common/taglibs.jsp"%>
<%@ include file="../common/ckeckuser.jsp" %>
<%
	request.setCharacterEncoding("UTF-8");
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/"; 
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>首页</title>
		<link href="${base }/style/style.css" type="text/css" rel="stylesheet" />
		<script language="text/sjavascript" src="jquery-1.7.2.js"></script> 
		<script type="text/javascript">
			 function loadXMLDoc()
				{
				var xmlhttp;
				if (window.XMLHttpRequest)
				  {// code for IE7+, Firefox, Chrome, Opera, Safari
				  xmlhttp=new XMLHttpRequest();
				  }
				else
				  {// code for IE6, IE5
				  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
				  }
				xmlhttp.onreadystatechange=function()
				  {
				  if (xmlhttp.readyState==4 && xmlhttp.status==200)
				    {
				    document.getElementById("result_url").innerHTML = xmlhttp.responseText;
				    }
				  }
				xmlhttp.open("POST","jsouptest",true);
				xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
				var siteurl = document.getElementById("site_url").value;
				var jsoupexp = document.getElementById("jsoup_exp").value;
				xmlhttp.send("site_url="+siteurl+"&jsoup_exp="+jsoupexp);
			}
		</script>
	</head>
	<body>
		<%@ include file="/./common/header.jsp"%>
	    <%@ include file="../common/tool_menu.jsp" %>   
			 
		<div id="sider_right">
			<img src="${base }/images/rightbordertop.jpg" class="imgfloat" /> 
			<div id="sr_cont" class="siderborder">
				    测试地址:<input type="text" value="" id="site_url"/>
				JSOUP表达式 ：<input type="text" value="" id="jsoup_exp"/>
				<input type="button" value="查看结果" onclick="loadXMLDoc()"></input>
			 	<div id="result_url"></div>
			</div>
			<img src="${base }/images/rightborderbuttom.jpg" class="imgfloat" />
		</div>
	</body>
</html>